<?php
/**
 * Created by PhpStorm.
 * User: 76683
 * Date: 2018/7/21
 * Time: 0:34
 */

namespace app\sd\model;


use think\Model;

class WeAds extends Model
{
    protected $autoWriteTimestamp = true;

    public static function adsList($map){
        $map['is_delete'] = 0;
        return self::where($map)->paginate(20);
    }

    public function setStartTimeAttr($value){
        return strtotime($value);
    }

    public function setEndTimeAttr($value){
        return strtotime($value);
    }
}